package io;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class WriteFile {
    public static void main(String[] args) throws IOException {
        File file = new File("C:\\Users\\ASUS\\Desktop\\Files\\new.txt");
        FileWriter fileWriter = new FileWriter(file);
        String str = "你好，天气不错，中午吃啥！！！！！！！！！";
        fileWriter.write(str);
        fileWriter.flush();
    }
}
